@*
 *Author：jxx
 *Contact：283591387@qq.com
 *Date：2018-07-01
 * 此代码由框架生成，请勿随意更改
 *@
@{
    Layout = "~/Views/Shared/ManagerLayout.cshtml";
}

<!DOCTYPE html>

<html>
<head>
    <title></title>
</head>
<body>
    <div style=" padding: 0px 5px 0px 2px; height: 100%;">

        <div id="lay-search-panel" class="panel lay-panel" style=" margin-bottom: 5px;border:0px;">
        </div>
        <div id="lay-reslut" class=" lay-reslut ">
            <table id="dataGrid"></table>
        </div>
    </div>
</body>
</html>

@{await Html.RenderPartialAsync("~/Views/Shared/Uploader.cshtml");}



<script>
    @{ViewBag.dropDownIds = "lt,pz,ct,sex,audit,enable";}
    var searchData = [[{"columnType":"string","dataSource":optionConfigpz,"displayType":"drop","text":"品种","require":false,"id":"Variety"},{"columnType":"string","dataSource":optionConfigct,"displayType":"drop","text":"类型","require":false,"id":"CowType"},{"columnType":"string","dataSource":optionConfigsex,"displayType":"drop","text":"公母","require":false,"id":"Sex"}],[{"columnType":"int","dataSource":optionConfiglt,"displayType":"drop","text":"交易类型","require":false,"id":"Ttype"},{"columnType":"string","dataSource":[],"displayType":"text","text":"所在地","require":false,"id":"Location"},{"columnType":"int","dataSource":optionConfigaudit,"displayType":"drop","text":"审核状态","require":false,"id":"AuditStatus"}],[{"columnType":"byte","dataSource":optionConfigenable,"displayType":"drop","text":"是否启用","require":false,"id":"Enable"},{"columnType":"string","dataSource":[],"displayType":"","text":"电话","require":false,"id":"PhoneNo"},{"columnType":"string","dataSource":[],"displayType":"","text":"联系人","require":false,"id":"Contact"}],[{"columnType":"string","dataSource":[],"displayType":"","text":"公司","require":false,"id":"Company"},{"columnType":"string","dataSource":[],"displayType":"","text":"发布人","require":false,"id":"Creator"},{"columnType":"datetime","dataSource":[],"displayType":"datetime","text":"发布时间","require":false,"id":"CreateDate"}]];
    var editData = [[{"columnType":"int","dataSource":optionConfiglt,"displayType":"drop","text":"交易类型","require":true,"id":"Ttype","fileMaxCount":10},{"columnType":"string","dataSource":[],"displayType":"","text":"标题","require":false,"id":"Title","fileMaxCount":10},{"columnType":"decimal","dataSource":[],"displayType":"","text":"价格/元/公斤","require":true,"id":"Price","fileMaxCount":10}],[{"columnType":"int","dataSource":[],"displayType":"","text":"数量(头)","require":true,"id":"Qty","fileMaxCount":10},{"columnType":"string","dataSource":optionConfigpz,"displayType":"drop","text":"品种","require":true,"id":"Variety","fileMaxCount":10},{"columnType":"string","dataSource":optionConfigct,"displayType":"drop","text":"类型","require":false,"id":"CowType","fileMaxCount":10}],[{"columnType":"string","dataSource":[],"displayType":"","text":"重量/KG","require":false,"id":"Weight","fileMaxCount":10},{"columnType":"string","dataSource":optionConfigsex,"displayType":"drop","text":"公母","require":false,"id":"Sex","fileMaxCount":10},{"columnType":"string","dataSource":[],"displayType":"text","text":"所在地","require":false,"id":"Location","fileMaxCount":10}],[{"columnType":"string","dataSource":[],"displayType":"","text":"公司","require":false,"id":"Company","fileMaxCount":10},{"columnType":"string","dataSource":[],"displayType":"","text":"联系人","require":true,"id":"Contact","fileMaxCount":10},{"columnType":"string","dataSource":[],"displayType":"","text":"电话","require":true,"id":"PhoneNo","fileMaxCount":10}],[{"columnType":"string","dataSource":[],"displayType":"","text":"牛源描述","require":false,"id":"Describe","fileMaxCount":10},{"columnType":"byte","dataSource":optionConfigenable,"displayType":"drop","text":"是否启用","require":false,"id":"Enable","fileMaxCount":10},{"columnType":"datetime","dataSource":[],"displayType":"datetime","text":"发布时间","require":false,"id":"CreateDate","fileMaxCount":10}],[{"columnType":"string","dataSource":[],"displayType":"file","text":"图片","require":false,"id":"FileUrl","colSize":12,"fileMaxCount":10}]];


    var gridParameters = {
        loadMsg: '数据正在加载。。。。',
        //rownumbers: true,
        pageSize: 30,
        pageList: [10, 20, 30, 50, 80, 100, 200, 500, 1000],
        height: 340,
        key:'Id',
        url: '/App_BeefTransaction/GetPageData',
        nameSpace:'',
        queryParams: {TableName:'App_BeefTransaction',sort:'Id',Foots:' ',Wheres:'{}'},
        pagination: true,
        striped:true,
        fileLink:true,
        richText:false,
        hasSection:false,
        cnName:'活牛交易',
        calculateHeight:{id:'#lay-search-panel'},
        calculateWidth:{id:'#lay-search-panel',totalWidth:3020,totalCol:23},
    frozenColumns: [[
     { field: 'ck', checkbox: true }
    ]],
    //showFooter: true,
        columns: [[{field:'Id',title:'主键ID',datatype:'int',width:80,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Ttype',title:'交易类型',datatype:'int',width:80,editor: { type: 'combobox', options: optionConfiglt },formatter: function (val, row, index) {
    return dataSourcelt.textFormatter(optionConfiglt, val, row, index);
    },
require:true,align:'left',sortable:true},
                       {field:'Title',title:'标题',datatype:'string',width:220,editor:'text',formatter:function (val, row, index) { return $.fn.layOut('createViewField',{row:row,val:val,index:index})},align:'left'},
                       {field:'Price',title:'价格/元/公斤',datatype:'decimal',width:90,editor:'text',require:true,align:'left'},
                       {field:'Price1',title:'价格1',datatype:'decimal',width:90,hidden:true,align:'left'},
                       {field:'Qty',title:'数量(头)',datatype:'int',width:80,editor:'text',require:true,align:'left'},
                       {field:'FileUrl',title:'图片',datatype:'string',width:220,editor:'text',formatter:function (val, row, index) { return $.fn.layOut('createImageUrl',{row:row,key:'FileUrl'})},align:'left'},
                       {field:'FileType',title:'文件类型',datatype:'int',width:80,hidden:true,align:'left'},
                       {field:'Variety',title:'品种',datatype:'string',width:120,editor: { type: 'combobox', options: optionConfigpz },formatter: function (val, row, index) {
    return dataSourcepz.textFormatter(optionConfigpz, val, row, index);
    },
require:true,align:'left'},
                       {field:'CowType',title:'类型',datatype:'string',width:120,editor: { type: 'combobox', options: optionConfigct },formatter: function (val, row, index) {
    return dataSourcect.textFormatter(optionConfigct, val, row, index);
    },
align:'left'},
                       {field:'Weight',title:'重量/KG',datatype:'string',width:90,editor:'text',align:'left'},
                       {field:'Sex',title:'公母',datatype:'string',width:100,editor: { type: 'combobox', options: optionConfigsex },formatter: function (val, row, index) {
    return dataSourcesex.textFormatter(optionConfigsex, val, row, index);
    },
align:'left'},
                       {field:'Location',title:'所在地',datatype:'string',width:130,editor:'text',align:'left'},
                       {field:'Describe',title:'牛源描述',datatype:'string',width:220,editor:'text',align:'left'},
                       {field:'Company',title:'公司',datatype:'string',width:220,editor:'text',align:'left'},
                       {field:'Contact',title:'联系人',datatype:'string',width:120,editor:'text',require:true,align:'left'},
                       {field:'PhoneNo',title:'电话',datatype:'string',width:90,editor:'text',require:true,align:'left'},
                       {field:'AuditStatus',title:'审核状态',datatype:'int',width:80,formatter: function (val, row, index) {
    return dataSourceaudit.textFormatter(optionConfigaudit, val, row, index);
    },
require:true,align:'left'},
                       {field:'AuditId',title:'审核人ID',datatype:'int',width:80,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人',datatype:'string',width:120,align:'left'},
                       {field:'AuditDate',title:'审核时间',datatype:'DateTime',width:150,align:'left',sortable:true},
                       {field:'Enable',title:'是否启用',datatype:'byte',width:90,editor: { type: 'combobox', options: optionConfigenable },formatter: function (val, row, index) {
    return dataSourceenable.textFormatter(optionConfigenable, val, row, index);
    },
align:'left'},
                       {field:'VideoKeys',title:'视频',datatype:'string',width:120,editor:'text',align:'left'},
                       {field:'CreateID',title:'创建人Id',datatype:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'发布人',datatype:'string',width:130,align:'left'},
                       {field:'CreateDate',title:'发布时间',datatype:'DateTime',width:150,editor:'datetimebox',align:'left',sortable:true},
                       {field:'ModifyID',title:'修改人ID',datatype:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人',datatype:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',datatype:'DateTime',width:150,align:'left',sortable:true}]]
    };

    var $elementGrid;
    window.onload = function () {
        $elementGrid = $('#dataGrid').datagrid(gridParameters);
    }

    var $elementDetailGrid;
    var gridDetailParameters = '';
</script>
